from tiresias.settings.dev import DATABASES
from conf.config import *


def scheduler_job_store():
	DEFAULT = {}
	if USE_DJANGO_DB:
		DEFAULT = DATABASES.get('default')
		engine = DEFAULT.get('ENGINE').split('.')[-1]
	else:
		DEFAULT = SCHEDULER_DB
		engine = DEFAULT.get('ENGINE')
	host = DEFAULT.get('HOST')
	db_name = DEFAULT.get('NAME')
	user = DEFAULT.get('USER')
	password = DEFAULT.get('PASSWORD')
	port = DEFAULT.get('PORT')
	return f'{engine}://{user}:{password}@{host}:{port}/{db_name}'


job_store_url = scheduler_job_store()
print(job_store_url)
